#include<iostream> 
using namespace std;

class Solution {
public:
    bool isPalindrome(int x) {
    	if(x < 0)return false;
    	if(x < 10)return true;
    	long long temp = x, temp2 = 0;
		while(temp){
			temp2 = temp2 * 10 + (temp % 10);
			temp /= 10;
		}	  
		return temp2 == x;
    }
};

int main(){
	Solution a;
	cout << a.isPalindrome(212);
}
